home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Interfaces / CIncludes / CMConversions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-06  |  4.3 KB  |  127 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        CMConversions.h
  3.  
  4.      Contains:    ColorSync base <-> derived color space conversion Component interface
  5.  
  6.      Version:    Technology:    ColorSync 2.0
  7.                  Package:    Universal Interfaces 2.1 in “MPW Latest” on ETO #18
  8.  
  9.      Copyright:    © 1984-1995 by Apple Computer, Inc.
  10.                  All rights reserved.
  11.  
  12.      Bugs?:        If you find a problem with this file, use the Apple Bug Reporter
  13.                  stack.  Include the file and version information (from above)
  14.                  in the problem description and send to:
  15.                      Internet:    apple.bugs@applelink.apple.com
  16.                      AppleLink:    APPLE.BUGS
  17.  
  18. */
  19.  
  20. #ifndef __CMCONVERSIONS__
  21. #define __CMCONVERSIONS__
  22.  
  23.  
  24. #ifndef __TYPES__
  25. #include <Types.h>
  26. #endif
  27. /*    #include <ConditionalMacros.h>                                */
  28.  
  29. #ifndef __COMPONENTS__
  30. #include <Components.h>
  31. #endif
  32. /*    #include <MixedMode.h>                                        */
  33.  
  34. #ifndef __CMAPPLICATION__
  35. #include <CMApplication.h>
  36. #endif
  37. /*    #include <Quickdraw.h>                                        */
  38. /*        #include <QuickdrawText.h>                                */
  39. /*    #include <Files.h>                                            */
  40. /*        #include <OSUtils.h>                                    */
  41. /*            #include <Memory.h>                                    */
  42. /*        #include <Finder.h>                                        */
  43. /*    #include <Printing.h>                                        */
  44. /*        #include <Errors.h>                                        */
  45. /*        #include <Dialogs.h>                                    */
  46. /*            #include <Menus.h>                                    */
  47. /*            #include <Controls.h>                                */
  48. /*            #include <Windows.h>                                */
  49. /*                #include <Events.h>                                */
  50. /*            #include <TextEdit.h>                                */
  51. /*    #include <CMICCProfile.h>                                    */
  52.  
  53. #ifdef __cplusplus
  54. extern "C" {
  55. #endif
  56.  
  57. #if PRAGMA_ALIGN_SUPPORTED
  58. #pragma options align=mac68k
  59. #endif
  60.  
  61. #if PRAGMA_IMPORT_SUPPORTED
  62. #pragma import on
  63. #endif
  64.  
  65.  
  66. enum {
  67.     CMConversionInterfaceVersion = 1
  68. };
  69.  
  70. /* Component function selectors */
  71. enum {
  72.     kCMXYZToLab                    = 0,
  73.     kCMLabToXYZ                    = 1,
  74.     kCMXYZToLuv                    = 2,
  75.     kCMLuvToXYZ                    = 3,
  76.     kCMXYZToYxy                    = 4,
  77.     kCMYxyToXYZ                    = 5,
  78.     kCMRGBToHLS                    = 6,
  79.     kCMHLSToRGB                    = 7,
  80.     kCMRGBToHSV                    = 8,
  81.     kCMHSVToRGB                    = 9,
  82.     kCMRGBToGRAY                = 10,
  83.     kCMXYZToFixedXYZ            = 11,
  84.     kCMFixedXYZToXYZ            = 12
  85. };
  86.  
  87. extern pascal ComponentResult CMXYZToLab(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  88.  FIVEWORDINLINE(0x2F3C, 16, 0, 0x7000, 0xA82A);
  89. extern pascal ComponentResult CMLabToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  90.  FIVEWORDINLINE(0x2F3C, 16, 1, 0x7000, 0xA82A);
  91. extern pascal ComponentResult CMXYZToLuv(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  92.  FIVEWORDINLINE(0x2F3C, 16, 2, 0x7000, 0xA82A);
  93. extern pascal ComponentResult CMLuvToXYZ(ComponentInstance ci, const CMColor *src, const CMXYZColor *white, CMColor *dst, unsigned long count)
  94.  FIVEWORDINLINE(0x2F3C, 16, 3, 0x7000, 0xA82A);
  95. extern pascal ComponentResult CMXYZToYxy(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  96.  FIVEWORDINLINE(0x2F3C, 12, 4, 0x7000, 0xA82A);
  97. extern pascal ComponentResult CMYxyToXYZ(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  98.  FIVEWORDINLINE(0x2F3C, 12, 5, 0x7000, 0xA82A);
  99. extern pascal ComponentResult CMRGBToHLS(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  100.  FIVEWORDINLINE(0x2F3C, 12, 6, 0x7000, 0xA82A);
  101. extern pascal ComponentResult CMHLSToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  102.  FIVEWORDINLINE(0x2F3C, 12, 7, 0x7000, 0xA82A);
  103. extern pascal ComponentResult CMRGBToHSV(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  104.  FIVEWORDINLINE(0x2F3C, 12, 8, 0x7000, 0xA82A);
  105. extern pascal ComponentResult CMHSVToRGB(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  106.  FIVEWORDINLINE(0x2F3C, 12, 9, 0x7000, 0xA82A);
  107. extern pascal ComponentResult CMRGBToGray(ComponentInstance ci, const CMColor *src, CMColor *dst, unsigned long count)
  108.  FIVEWORDINLINE(0x2F3C, 12, 10, 0x7000, 0xA82A);
  109. extern pascal ComponentResult CMXYZToFixedXYZ(ComponentInstance ci, const CMXYZColor *src, CMFixedXYZColor *dst, unsigned long count)
  110.  FIVEWORDINLINE(0x2F3C, 12, 11, 0x7000, 0xA82A);
  111. extern pascal ComponentResult CMFixedXYZToXYZ(ComponentInstance ci, const CMFixedXYZColor *src, CMXYZColor *dst, unsigned long count)
  112.  FIVEWORDINLINE(0x2F3C, 12, 12, 0x7000, 0xA82A);
  113.  
  114. #if PRAGMA_IMPORT_SUPPORTED
  115. #pragma import off
  116. #endif
  117.  
  118. #if PRAGMA_ALIGN_SUPPORTED
  119. #pragma options align=reset
  120. #endif
  121.  
  122. #ifdef __cplusplus
  123. }
  124. #endif
  125.  
  126. #endif /* __CMCONVERSIONS__ */
  127.